package com.wu.layer.stereotype.simple.controller;

import com.wu.framework.inner.layer.data.NormalConvertMapper;
import com.wu.framework.inner.layer.web.EasyController;
import com.wu.layer.stereotype.simple.domian.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * description
 *
 * @author 吴佳伟
 * @company 杭州来回科技有限公司
 * @date 2022/1/25$ 4:24 下午$
 */
@Api(tags = "用户服务")
@EasyController("/uer")
public class SysUserController {


    /**
     * description 获取用户信息
     * @author 吴佳伟
     * @company 杭州来回科技有限公司
     * @date 2022/1/25 4:28 下午
     */
    @NormalConvertMapper
    @ApiOperation("获取用户信息")
    @PostMapping("/list")
    public List<SysUser> list() {
        List<SysUser> sysUserList = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            final SysUser sysUser = new SysUser();
            sysUser.setSex(i);
            sysUser.setUsername("小名" + i);
            sysUserList.add(sysUser);
        }
        return sysUserList;
    }
}
